// ACW

// AVM_Test
// Joe Pardue December 17, 2009
// based on Tom Igoe's example in the 
// Arduino Serial.print(data) documentation

#include "libACW001.h"

int main(void)
{
	init();		// Initialize the private stuff
	setup();	// Setup the public stuff

	for(;;)		// Call loop() forever
		loop();

	return 0;	// You never get here

}



void setup()
{
  // begin the serial communication
  //Serial.begin(19200);		// TAW
  serialBegin(19200);
}

// variable to hold the analog input value
int analogValue = 0;

void loop()
{
  // read the analog input on pin 0
  analogValue = analogRead(0);
  
  // print as an ASCII-encoded decimal
  //Serial.print(analogValue, DEC);		// TAW
  printf("%d\n", analogValue);
  
  // print a terminal newline character so the AVR Voltmeter
  // will know that it has received the full string
  //Serial.print('\n');					// TAW
  //printf('\n');
  
  // delay 1 second before the next reading:
  delay(1000);
}
